#include<bits/stdc++.h>
using namespace std;
int n;
int a[100001];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    int total=0;
    int minn=INT_MAX,maxn=INT_MIN;
    for(int i=1;i<=n;i++)cin>>a[i];
    sort(a+1,a+n+1);
    for(int i=1,j=1;i<=n,j<=n;i++){
        while(a[i]==a[j])j++;
        if(j>n)break;
        total++,j++;
    }
    cout<<n-total<<endl;
    fclose(stdin);
    fclose(stdout);
    return 0;
}